NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO!
DO NOT USE THIS AS IS!!!!!!
You need two important changes. Firstly, my example code generates a 5 digit random, whilst the existing gives a 6 digit. This version works:
Secondly, you MUST put a call to "srand(time());" somewhere where it will get run once per execution (like the top os lib.cgi) else they wont be random at all!
Just a thought
